package com.cloudbroker.bcs.csvc.lightinvesting.facade.service;

import com.cloudbroker.bcs.csvc.lightinvesting.api.service.IFSService;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.request.ifs.*;
import com.cloudbroker.bcs.csvc.lightinvesting.api.vo.response.IFS.*;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

import static com.cloudbroker.bcs.csvc.lightinvesting.api.constants.LedT2FunctionIds.*;

/**
 * Created by fangyf18371 on 2016/11/3.
 */
@Service
public class IFSServiceFacade implements IFSService{
    @Resource
    private IFST2RemoteService ifst2RemoteService;

    @Override
    public RegisterVo func_register(RegisterForm param) {
        return ifst2RemoteService.callT2(REGISTER,param,RegisterVo.class);
    }

    @Override
    public LoginVo func_login(LoginForm param) {
        return ifst2RemoteService.callT2(LOGIN,param,LoginVo.class);
    }

    @Override
    public AuthCodeGetVo func_auth_code_get(AuthCodeGetForm param) {
        return ifst2RemoteService.callT2(AUTH_CODE_GET,param,AuthCodeGetVo.class);
    }

    @Override
    public AuthCodeLoginVo func_auth_code_login(AuthCodeLoginForm param) {
        return ifst2RemoteService.callT2(AUTH_CODE_LOGIN,param,AuthCodeLoginVo.class);
    }

    @Override
    public UserUpdateVo func_user_update(UserUpdateForm param) {
        return ifst2RemoteService.callT2(USER_UPDATE,param,UserUpdateVo.class);
    }

    @Override
    public UserinfoVo func_userinfo(UserinfoForm param) {
        return ifst2RemoteService.callT2(USERINFO,param,UserinfoVo.class);
    }

    @Override
    public UserTokenCheckVo func_user_token_check(UserTokenCheckForm param) {
        return ifst2RemoteService.callT2(USER_TOKEN_CHECK,param,UserTokenCheckVo.class);
    }

    @Override
    public LogoutVo func_logout(LogoutForm param) {
        return ifst2RemoteService.callT2(LOGOUT,param,LogoutVo.class);
    }

    @Override
    public UploadVo func_upload(UploadForm param) {
        return ifst2RemoteService.callT2(UPLOAD,param,UploadVo.class);
    }

    @Override
    public DownloadVo func_download(DownloadForm param) {
        return ifst2RemoteService.callT2(DOWNLOAD,param,DownloadVo.class);
    }

    @Override
    public PasswordResetVo func_password_reset( PasswordResetForm param) {
        return ifst2RemoteService.callT2(PASSWORD_RESET,param,PasswordResetVo.class);
    }

    @Override
    public RegisterAndLoginVo func_register_and_login(RegisterAndLoginForm param) {
        return ifst2RemoteService.callT2(REGISTER_AND_LOGIN,param,RegisterAndLoginVo.class);
    }

    @Override
    public CheckRegisterVo func_check_register(CheckRegisterForm param) {
        return ifst2RemoteService.callT2(CHECK_REGISTER,param,CheckRegisterVo.class);
    }

    @Override
    public UserbasicinfoVo func_userbasicinfo(UserbasicinfoForm param) {
        return ifst2RemoteService.callT2(USERBASICINFO,param,UserbasicinfoVo.class);
    }

    @Override
    public UserPageQueryVo func_user_page_query(UserPageQueryForm param) {
        return ifst2RemoteService.callT2(USER_PAGE_QUERY,param,UserPageQueryVo.class);
    }

    @Override
    public AdviserSaveVo func_adviser_save(AdviserSaveForm param) {
        return ifst2RemoteService.callT2(ADVISER_SAVE,param,AdviserSaveVo.class);
    }

    @Override
    public AdviserUpdateVo func_adviser_update(AdviserUpdateForm param) {
        return ifst2RemoteService.callT2(ADVISER_UPDATE,param,AdviserUpdateVo.class);
    }

    @Override
    public AdviserGetVo func_adviser_get(AdviserGetForm param) {
        return ifst2RemoteService.callT2(ADVISER_GET,param,AdviserGetVo.class);
    }

    @Override
    public AdviserPageQueryVo func_adviser_page_query(AdviserPageQueryForm param) {
        return ifst2RemoteService.callT2(ADVISER_PAGE_QUERY,param,AdviserPageQueryVo.class);
    }

    @Override
    public UserUpdatePasswordVo func_user_update_password(UserUpdatePasswordForm param) {
        return ifst2RemoteService.callT2(USER_UPDATE_PASSWORD,param,UserUpdatePasswordVo.class);
    }

    public CapitalAccountLoginVo func_capital_account_login( CapitalAccountLoginForm param){
        return ifst2RemoteService.callT2(CAPITAL_ACCOUNT_LOGIN,param,CapitalAccountLoginVo.class);
    }
}
